﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FluentNHibernate.Mapping;

namespace JCSoft.Collect.Data.Mappings
{
    public class DataProjectMap : ClassMap<DataProject>
    {
        public DataProjectMap()
        {
            Id(d => d.DataProjectID).GeneratedBy.Identity();
            Map(d => d.UserID);
            Map(d => d.Name);
            Map(d => d.SiteName);
            Map(d => d.IntakeUrl);
            Map(d => d.Encoding).CustomType<PageEncoding>();
            Map(d => d.Abstrace);
            Map(d => d.Status).CustomType<DataProjectStatus>();
            Map(d => d.Limit).CustomType<DataProjectLimit>();
            Map(d => d.CreateTime).Generated.Insert();
        }
    }
}
